package cn.thoughtworks.school.programCenter.util;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.net.URL;

public class FileDownloadUtil {
    public static void downloadZipFile(String url, String dir) {
        try {
            URL httpUrl = new URL(url);
            File file = new File(dir + ".zip");
            FileUtils.copyURLToFile(httpUrl, file);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
